home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Personal Computer World 2009 February
/
PCWFEB09.iso
/
Software
/
Resources
/
Chat & Communication
/
Digsby build 37
/
digsby_setup.exe
/
lib
/
digsby
/
widgets
/
widgets.pyo
(
.txt
)
< prev
Wrap
Python Compiled Bytecode
|
2008-10-13
|
2KB
|
32 lines
# Source Generated with Decompyle++
# File: in.pyo (Python 2.5)
from digsby.widgets.widget import Widget
from pyxmpp.objects import StanzaPayloadObject
from pyxmpp.xmlextra import get_node_ns_uri
from digsby.widgets import DIGSBY_WIDGETS_NS
from jabber.jabber_util import xpath_eval
class Widgets(StanzaPayloadObject, list):
xml_element_name = 'query'
xml_element_namespace = DIGSBY_WIDGETS_NS
def __init__(self, xmlelem):
self._Widgets__from_xml(xmlelem)
def __from_xml(self, node):
if node.type != 'element':
raise ValueError, 'XML node is not an Widgets element (not en element)'
ns = get_node_ns_uri(node)
if ns or ns != DIGSBY_WIDGETS_NS or node.name != 'query':
raise ValueError, 'XML node is not an Widgets element'
widgets = xpath_eval(node, 'w:widget', {
'w': DIGSBY_WIDGETS_NS })
self.extend((lambda .0: for widget in .0:
Widget(widget))(widgets))